﻿using Lidgren.Network;

namespace D2D2.SharedInterfaces.Networking
{
    public enum SignalType
    {
        Unknown = 0,
        GenerateBattlefield = 1
    }

    public class SignalMessage : BaseMessage
    {
        public SignalMessage(NetIncomingMessage message)
            : base(message)
        {

        }

        public SignalMessage()
        {

        }

        public override GameMessageType MessageType
        {
            get { return GameMessageType.Signal; }
        }

        public SignalType SignalType { get; set; }

        public override void Encode(NetOutgoingMessage message)
        {
            message.Write((byte) SignalType);
        }

        public override void Decode(NetIncomingMessage message)
        {
            SignalType = (SignalType) message.ReadByte();
        }
    }
}
